{% extends "base.html" %}

{% block meta %}
    <meta name="menu-tag" content="21"/>
{% end block %}

{% block main %}
<div class="container">
    <ol class="breadcrumb">
        <li class="active">服务器信息</li>
    </ol>

    <!-- 查询结果开始 -->
    <table class="table table-striped table-bordered" >
        <caption>
            <h4><strong>运行的服务器</strong></h4>
        </caption>
        <thead>
            <tr>
                <th>主机</th>
                <th>IP</th>
                <th>角色</th>
                <th>状态</th>
                <th>CPU(核)</th>
                <th>内存(MB)</th>
            </tr>
        </thead>
        <tbody>
            {% for node in nodes %}
            <tr>
                <td>{{ node['hostname'] }}</td>
                <td>{{ node['ip'] }}</td>
                <td>{{ node['role'] }}</td>
                <td>{{ node['state'] }}</td>
                <td>{{ format(node['cpu'] / 1e9, '.0f') }}</td>
                <td>{{ format(node['memory'] / (1024* 1024), '.0f') }}</td>
            </tr>
            {% end %}
        </tbody>
    </table>
</div>
{% end block %}


{% block script %}
<script type="text/javascript">
    
</script>
{% end block %}
